//
// Created by ChenJi on 2021/1/6.
//

#ifndef WARNER_RTC_EXTERN_H
#define WARNER_RTC_EXTERN_H

#endif //WARNER_RTC_EXTERN_H
#include "main.h"
typedef struct {
    uint8_t day;
    uint8_t month;
    uint8_t year;
    uint8_t hour;
    uint8_t minute;
    uint8_t second;
}TIME_STAMP;
__weak void systick();
__weak void rtctick();
void setRTCIRQ();
void getTime(RTC_TimeTypeDef *def);
void getDate(RTC_DateTypeDef *def);
void setYear(uint8_t dat);
void setMonth(uint8_t dat);
void setDay(uint8_t dat);
void setMinute(uint8_t dat);
void setSecond(uint8_t dat);
void setHour(uint8_t dat);
void update_buff_time();
TIME_STAMP *getCurrentTimeSTAMP();
void startSyncTimePlan();
void stopSyncTimePlan();
void syncTime(uint8_t year, uint8_t month, uint8_t date, uint8_t hour, uint8_t minute, uint8_t second);